import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:get/get.dart';
import 'package:life_service/color/hex.dart';
import 'package:life_service/extensions/ex_widget.dart';
import 'package:life_service/route/index.dart';
import 'package:life_service/ui/draw_under_line.dart';
import 'package:life_service/utils/styles.dart';
import 'package:scrollview_observer/scrollview_observer.dart';

import 'controller.dart';

class HotelInfoPage extends GetView<HotelInfoController> {
  const HotelInfoPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: HexColor(HexColor.colorF2f2),
      appBar: AppBar(
        backgroundColor: Colors.white,
        systemOverlayStyle: SystemUiOverlayStyle.dark,
        leadingWidth: 130,
        leading: TextButton(
          onPressed: Get.back,
          child: Text.rich(
            TextSpan(
              children: [
                const WidgetSpan(
                  child: Icon(
                    CupertinoIcons.chevron_back,
                    size: 18,
                    color: Colors.black,
                  ),
                ),
                TextSpan(
                  text: ' 酒店详情',
                  style: StylesUtils.customTextStyle(
                    fontSize: StylesUtils.fontSize16,
                    color: HexColor.color3333,
                  ),
                ),
              ],
            ),
          ),
        ),
        actions: [
          IconButton(
            onPressed: () {},
            icon: const Icon(
              CupertinoIcons.location_fill,
              size: 18,
              color: Colors.black,
            ),
          ),
        ],
        elevation: 1,
        shadowColor: HexColor(HexColor.colorF2f2),
        bottom: PreferredSize(
          preferredSize: const Size.fromHeight(35),
          child: Container(
            alignment: Alignment.center,
            padding: const EdgeInsets.only(bottom: 6),
            child: TabBar(
              controller: controller.tabController,
              tabs: controller.tabs
                  .map(
                    (str) => Tab(
                      text: str,
                    ),
                  )
                  .toList(),
              isScrollable: false,
              dividerHeight: 0,
              unselectedLabelStyle: StylesUtils.customTextStyle(
                color: HexColor.color3333,
              ),
              unselectedLabelColor: HexColor(HexColor.color3333),
              labelStyle: StylesUtils.customTextStyle(
                color: HexColor.colorFf62,
              ),
              labelColor: HexColor(HexColor.colorFf62),
              indicatorColor: HexColor(HexColor.colorFf62),
              indicatorSize: TabBarIndicatorSize.label,
              indicatorWeight: 3,
              onTap: (int index) {
                controller.observerController.animateTo(
                  index: controller.tabIndexs[index],
                  duration: const Duration(milliseconds: 250),
                  curve: Curves.ease,
                );
              },
            ),
          ),
        ),
      ),
      body: ListViewObserver(
        controller: controller.observerController,
        child: ListView(
          controller: controller.scrollController,
          children: [
            Container(
              color: Colors.white,
              padding: EdgeInsets.symmetric(
                  horizontal: (Get.width - 334) / 2, vertical: 15),
              child: Column(
                children: [
                  Container(
                    alignment: Alignment.center,
                    child: Text(
                      '贯通现代酒店（北京前门店）',
                      style: StylesUtils.customTextStyle(
                        fontSize: StylesUtils.fontSize18,
                        color: HexColor.color3333,
                        fontWeight: FontWeight.w700,
                      ),
                      softWrap: false,
                    ),
                  ),
                  Container(
                    alignment: Alignment.centerLeft,
                    margin: const EdgeInsets.only(bottom: 10, top: 15),
                    child: Text.rich(
                      TextSpan(
                        children: [
                          TextSpan(
                            text: '开业时间：',
                            style: StylesUtils.customTextStyle(
                              color: HexColor.color9999,
                            ),
                          ),
                          TextSpan(
                            text: '2011年09月11日',
                            style: StylesUtils.customTextStyle(
                              color: HexColor.color3333,
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                  Container(
                    alignment: Alignment.centerLeft,
                    margin: const EdgeInsets.only(bottom: 10),
                    child: Text.rich(
                      TextSpan(
                        children: [
                          TextSpan(
                            text: '装修时间：',
                            style: StylesUtils.customTextStyle(
                              color: HexColor.color9999,
                            ),
                          ),
                          TextSpan(
                            text: '2011年07月11日',
                            style: StylesUtils.customTextStyle(
                              color: HexColor.color3333,
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                  Container(
                    alignment: Alignment.centerLeft,
                    margin: const EdgeInsets.only(bottom: 10),
                    child: Text.rich(
                      TextSpan(
                        children: [
                          TextSpan(
                            text: '酒店类型：',
                            style: StylesUtils.customTextStyle(
                              color: HexColor.color9999,
                            ),
                          ),
                          TextSpan(
                            text: '经济型',
                            style: StylesUtils.customTextStyle(
                              color: HexColor.color3333,
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                  Container(
                    alignment: Alignment.centerLeft,
                    margin: const EdgeInsets.only(bottom: 10),
                    child: Text.rich(
                      TextSpan(
                        children: [
                          TextSpan(
                            text: '酒店地址：',
                            style: StylesUtils.customTextStyle(
                              color: HexColor.color9999,
                            ),
                          ),
                          TextSpan(
                            text: '和平西桥樱花西街89号',
                            style: StylesUtils.customTextStyle(
                              color: HexColor.color3333,
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                  Container(
                    alignment: Alignment.centerLeft,
                    child: Text(
                      '距和平西桥地铁站直线0.2公里，步行约 0.8公里，预计5分钟',
                      style: StylesUtils.customTextStyle(
                          lineHeight: 1.6, color: HexColor.color9999),
                    ),
                  ),
                  Container(
                    margin: const EdgeInsets.only(top: 20),
                    height: 45,
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(4),
                        border:
                            Border.all(color: HexColor(HexColor.colorFfc7))),
                    alignment: Alignment.center,
                    child: Text(
                      '酒店电话：010-57890900',
                      style: StylesUtils.customTextStyle(
                        color: HexColor.colorFfc7,
                      ),
                    ),
                  )
                ],
              ),
            ),
            Padding(
              padding: const EdgeInsets.only(top: 15),
              child: Container(
                color: Colors.white,
                padding: const EdgeInsets.symmetric(vertical: 20),
                child: Column(
                  children: [
                    Container(
                      alignment: Alignment.centerLeft,
                      margin: const EdgeInsets.only(bottom: 20),
                      padding: const EdgeInsets.only(left: 25),
                      child: Text(
                        '酒店设施',
                        style: StylesUtils.customTextStyle(
                          fontSize: StylesUtils.fontSize16,
                          color: HexColor.color3333,
                          fontWeight: FontWeight.w700,
                        ),
                      ),
                    ),
                    StaggeredGrid.count(
                      crossAxisCount: 5,
                      crossAxisSpacing: 10,
                      mainAxisSpacing: 15,
                      children: [
                        Column(
                          children: [
                            Container(
                              alignment: Alignment.center,
                              child: Icon(
                                CupertinoIcons.wifi,
                                size: 25,
                                color: HexColor(HexColor.color3333),
                              ),
                            ),
                            Container(
                              margin: const EdgeInsets.only(top: 5),
                              alignment: Alignment.center,
                              child: Text(
                                'WIFI',
                                style: StylesUtils.customTextStyle(
                                  fontSize: StylesUtils.fontSize12,
                                  color: HexColor.color3333,
                                ),
                              ),
                            )
                          ],
                        ),
                        Column(
                          children: [
                            Container(
                              alignment: Alignment.center,
                              child: Icon(
                                CupertinoIcons.hourglass,
                                size: 25,
                                color: HexColor(HexColor.color3333),
                              ),
                            ),
                            Container(
                              margin: const EdgeInsets.only(top: 5),
                              alignment: Alignment.center,
                              child: Text(
                                '自助餐厅',
                                style: StylesUtils.customTextStyle(
                                  fontSize: StylesUtils.fontSize12,
                                  color: HexColor.color3333,
                                ),
                              ),
                            )
                          ],
                        ),
                        Column(
                          children: [
                            Container(
                              alignment: Alignment.center,
                              child: Icon(
                                CupertinoIcons.hammer_fill,
                                size: 25,
                                color: HexColor(HexColor.color3333),
                              ),
                            ),
                            Container(
                              margin: const EdgeInsets.only(top: 5),
                              alignment: Alignment.center,
                              child: Text(
                                '停车场',
                                style: StylesUtils.customTextStyle(
                                  fontSize: StylesUtils.fontSize12,
                                  color: HexColor.color3333,
                                ),
                              ),
                            )
                          ],
                        ),
                        Column(
                          children: [
                            Container(
                              alignment: Alignment.center,
                              child: Icon(
                                CupertinoIcons.phone_arrow_right,
                                size: 25,
                                color: HexColor(HexColor.color3333),
                              ),
                            ),
                            Container(
                              margin: const EdgeInsets.only(top: 5),
                              alignment: Alignment.center,
                              child: Text(
                                '会议室',
                                style: StylesUtils.customTextStyle(
                                  fontSize: StylesUtils.fontSize12,
                                  color: HexColor.color3333,
                                ),
                              ),
                            )
                          ],
                        ),
                        Column(
                          children: [
                            Container(
                              alignment: Alignment.center,
                              child: Icon(
                                CupertinoIcons.piano,
                                size: 25,
                                color: HexColor(HexColor.color3333),
                              ),
                            ),
                            Container(
                              margin: const EdgeInsets.only(top: 5),
                              alignment: Alignment.center,
                              child: Text(
                                '餐厅',
                                style: StylesUtils.customTextStyle(
                                  fontSize: StylesUtils.fontSize12,
                                  color: HexColor.color3333,
                                ),
                              ),
                            )
                          ],
                        ),
                        Column(
                          children: [
                            Container(
                              alignment: Alignment.center,
                              child: Icon(
                                CupertinoIcons.rectangle_3_offgrid,
                                size: 25,
                                color: HexColor(HexColor.color3333),
                              ),
                            ),
                            Container(
                              margin: const EdgeInsets.only(top: 5),
                              alignment: Alignment.center,
                              child: Text(
                                '行李寄存',
                                style: StylesUtils.customTextStyle(
                                  fontSize: StylesUtils.fontSize12,
                                  color: HexColor.color3333,
                                ),
                              ),
                            )
                          ],
                        ),
                        Column(
                          children: [
                            Container(
                              alignment: Alignment.center,
                              child: Icon(
                                CupertinoIcons.sun_dust_fill,
                                size: 25,
                                color: HexColor(HexColor.color3333),
                              ),
                            ),
                            Container(
                              margin: const EdgeInsets.only(top: 5),
                              alignment: Alignment.center,
                              child: Text(
                                '热水淋雨',
                                style: StylesUtils.customTextStyle(
                                  fontSize: StylesUtils.fontSize12,
                                  color: HexColor.color3333,
                                ),
                              ),
                            )
                          ],
                        ),
                        Column(
                          children: [
                            Container(
                              alignment: Alignment.center,
                              child: Icon(
                                CupertinoIcons.wrench_fill,
                                size: 25,
                                color: HexColor(HexColor.color3333),
                              ),
                            ),
                            Container(
                              margin: const EdgeInsets.only(top: 5),
                              alignment: Alignment.center,
                              child: Text(
                                '商务中',
                                style: StylesUtils.customTextStyle(
                                  fontSize: StylesUtils.fontSize12,
                                  color: HexColor.color3333,
                                ),
                              ),
                            )
                          ],
                        ),
                      ],
                    ).paddingSymmetric(horizontal: 15),
                  ],
                ),
              ),
            ),
            Padding(
              padding: const EdgeInsets.only(top: 15),
              child: Container(
                color: Colors.white,
                padding: EdgeInsets.symmetric(
                    vertical: 20, horizontal: (Get.width - 300) / 2),
                child: Column(
                  children: [
                    Container(
                      alignment: Alignment.centerLeft,
                      margin: const EdgeInsets.only(bottom: 20),
                      child: Text(
                        '入住须知',
                        style: StylesUtils.customTextStyle(
                          fontSize: StylesUtils.fontSize16,
                          color: HexColor.color3333,
                          fontWeight: FontWeight.w700,
                        ),
                      ),
                    ),
                    Container(
                      height: 24,
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '外宾政策',
                        style: StylesUtils.customTextStyle(
                          color: HexColor.color3333,
                          fontWeight: FontWeight.w700,
                        ),
                      ),
                    ),
                    Container(
                      height: 24,
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '直接待内宾预订入住',
                        style: StylesUtils.customTextStyle(
                          color: HexColor.color3333,
                        ),
                      ),
                    ),
                    Container(
                      height: 24,
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '入离时间',
                        style: StylesUtils.customTextStyle(
                          color: HexColor.color3333,
                          fontWeight: FontWeight.w700,
                        ),
                      ),
                    ),
                    Container(
                      height: 24,
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '入住时间：12:00以后   离店时间：14:00以前',
                        style: StylesUtils.customTextStyle(
                          color: HexColor.color3333,
                        ),
                      ),
                    ),
                    Container(
                      height: 24,
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '发票',
                        style: StylesUtils.customTextStyle(
                          color: HexColor.color3333,
                          fontWeight: FontWeight.w700,
                        ),
                      ),
                    ),
                    Container(
                      height: 24,
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '可开具增值税普通/专用发票',
                        style: StylesUtils.customTextStyle(
                          color: HexColor.color3333,
                        ),
                      ),
                    ),
                    Container(
                      height: 24,
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '宠物',
                        style: StylesUtils.customTextStyle(
                          color: HexColor.color3333,
                          fontWeight: FontWeight.w700,
                        ),
                      ),
                    ),
                    Container(
                      height: 24,
                      alignment: Alignment.centerLeft,
                      child: Text(
                        '不允许携带宠物',
                        style: StylesUtils.customTextStyle(
                          color: HexColor.color3333,
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ),
            Padding(
              padding: const EdgeInsets.only(top: 15),
              child: Column(
                children: [
                  Container(
                    color: Colors.white,
                    padding: EdgeInsets.symmetric(
                        vertical: 20, horizontal: (Get.width - 334) / 2),
                    child: Column(
                      children: [
                        Container(
                          alignment: Alignment.centerLeft,
                          margin: const EdgeInsets.only(bottom: 20),
                          child: Text(
                            '交通娱乐',
                            style: StylesUtils.customTextStyle(
                              fontSize: StylesUtils.fontSize16,
                              fontWeight: FontWeight.w700,
                              color: HexColor.color3333,
                            ),
                          ),
                        ),
                        StaggeredGrid.count(
                          crossAxisCount: 4,
                          crossAxisSpacing: 10,
                          children: controller.tags
                              .asMap()
                              .map(
                                (key, value) => MapEntry(
                                  key,
                                  Obx(
                                    () => Container(
                                      height: 30,
                                      decoration: BoxDecoration(
                                        borderRadius: BorderRadius.circular(4),
                                        color: controller.tagIdx.value == key
                                            ? HexColor(HexColor.colorFf62)
                                            : Colors.transparent,
                                        border: Border.all(
                                          color: controller.tagIdx.value == key
                                              ? HexColor(HexColor.colorFf62)
                                              : Colors.transparent,
                                          width: controller.tagIdx.value == key
                                              ? 1
                                              : 0,
                                        ),
                                      ),
                                      alignment: Alignment.center,
                                      child: Text(
                                        value,
                                        style: StylesUtils.customTextStyle(
                                          color: controller.tagIdx.value == key
                                              ? HexColor.colorFfff
                                              : HexColor.colorFf62,
                                        ),
                                      ),
                                    ).onTap(() {
                                      controller.tagIdx.value = key;
                                    }),
                                  ),
                                ),
                              )
                              .values
                              .toList(),
                        ).paddingOnly(bottom: 15),
                        Obx(
                          () => IndexedStack(
                            index: controller.tagIdx.value,
                            children: [
                              Column(
                                children: [
                                  DrawUnderLine(
                                    child: SizedBox(
                                      height: 71,
                                      child: Column(
                                        children: [
                                          Container(
                                            height: 28,
                                            alignment: Alignment.centerLeft,
                                            child: Text(
                                              '北京南苑机场',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                color: HexColor.color3333,
                                              ),
                                            ),
                                          ),
                                          Container(
                                            height: 28,
                                            alignment: Alignment.centerLeft,
                                            child: Text(
                                              '1.6km',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                color: HexColor.color9999,
                                              ),
                                            ),
                                          ),
                                        ],
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    child: DrawUnderLine(
                                      child: SizedBox(
                                        height: 71,
                                        child: Column(
                                          children: [
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '北京南苑机场',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color3333,
                                                ),
                                              ),
                                            ),
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '1.6km',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color9999,
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    child: DrawUnderLine(
                                      child: SizedBox(
                                        height: 71,
                                        child: Column(
                                          children: [
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '北京南苑机场',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color3333,
                                                ),
                                              ),
                                            ),
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '1.6km',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color9999,
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    height: 71,
                                    child: Column(
                                      children: [
                                        Container(
                                          height: 28,
                                          alignment: Alignment.centerLeft,
                                          child: Text(
                                            '北京南苑机场',
                                            style: StylesUtils.customTextStyle(
                                              color: HexColor.color3333,
                                            ),
                                          ),
                                        ),
                                        Container(
                                          height: 28,
                                          alignment: Alignment.centerLeft,
                                          child: Text(
                                            '1.6km',
                                            style: StylesUtils.customTextStyle(
                                              color: HexColor.color9999,
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                ],
                              ),
                              Column(
                                children: [
                                  DrawUnderLine(
                                    child: SizedBox(
                                      height: 71,
                                      child: Column(
                                        children: [
                                          Container(
                                            height: 28,
                                            alignment: Alignment.centerLeft,
                                            child: Text(
                                              '观景亭（东三环中路铺路）',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                color: HexColor.color3333,
                                              ),
                                            ),
                                          ),
                                          Container(
                                            height: 28,
                                            alignment: Alignment.centerLeft,
                                            child: Text(
                                              '1.6km',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                color: HexColor.color9999,
                                              ),
                                            ),
                                          ),
                                        ],
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    child: DrawUnderLine(
                                      child: SizedBox(
                                        height: 71,
                                        child: Column(
                                          children: [
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '观景亭（东三环中路铺路）',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color3333,
                                                ),
                                              ),
                                            ),
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '1.6km',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color9999,
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    child: DrawUnderLine(
                                      child: SizedBox(
                                        height: 71,
                                        child: Column(
                                          children: [
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '观景亭（东三环中路铺路）',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color3333,
                                                ),
                                              ),
                                            ),
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '1.6km',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color9999,
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                      ),
                                    ),
                                  ),
                                  Container(
                                    height: 71,
                                    margin: const EdgeInsets.only(top: 10),
                                    child: Column(
                                      children: [
                                        Container(
                                          height: 28,
                                          alignment: Alignment.centerLeft,
                                          child: Text(
                                            '观景亭（东三环中路铺路）',
                                            style: StylesUtils.customTextStyle(
                                              color: HexColor.color3333,
                                            ),
                                          ),
                                        ),
                                        Container(
                                          height: 28,
                                          alignment: Alignment.centerLeft,
                                          child: Text(
                                            '1.6km',
                                            style: StylesUtils.customTextStyle(
                                              color: HexColor.color9999,
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                ],
                              ),
                              Column(
                                children: [
                                  DrawUnderLine(
                                    child: SizedBox(
                                      height: 100,
                                      child: Column(
                                        children: [
                                          Container(
                                            height: 28,
                                            alignment: Alignment.centerLeft,
                                            child: Text(
                                              '意大利餐厅',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                color: HexColor.color3333,
                                              ),
                                            ),
                                          ),
                                          Container(
                                            height: 28,
                                            alignment: Alignment.centerLeft,
                                            child: Text.rich(
                                              TextSpan(
                                                children: [
                                                  TextSpan(
                                                    text: '4.5分   ',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                      color: HexColor.colorFfc7,
                                                    ),
                                                  ),
                                                  TextSpan(
                                                    text: '营业时间：11:30-22:00',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                      color: HexColor.color9999,
                                                    ),
                                                  ),
                                                ],
                                              ),
                                            ),
                                          ),
                                          Container(
                                            height: 28,
                                            alignment: Alignment.centerLeft,
                                            child: Text(
                                              '1.6km',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                color: HexColor.color9999,
                                              ),
                                            ),
                                          ),
                                        ],
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    child: DrawUnderLine(
                                      child: SizedBox(
                                        height: 100,
                                        child: Column(
                                          children: [
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '意大利餐厅',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color3333,
                                                ),
                                              ),
                                            ),
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text.rich(
                                                TextSpan(
                                                  children: [
                                                    TextSpan(
                                                      text: '4.5分   ',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                        color:
                                                            HexColor.colorFfc7,
                                                      ),
                                                    ),
                                                    TextSpan(
                                                      text: '营业时间：11:30-22:00',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                        color:
                                                            HexColor.color9999,
                                                      ),
                                                    ),
                                                  ],
                                                ),
                                              ),
                                            ),
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '1.6km',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color9999,
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    child: DrawUnderLine(
                                      child: SizedBox(
                                        height: 100,
                                        child: Column(
                                          children: [
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '意大利餐厅',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color3333,
                                                ),
                                              ),
                                            ),
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text.rich(
                                                TextSpan(
                                                  children: [
                                                    TextSpan(
                                                      text: '4.5分   ',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                        color:
                                                            HexColor.colorFfc7,
                                                      ),
                                                    ),
                                                    TextSpan(
                                                      text: '营业时间：11:30-22:00',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                        color:
                                                            HexColor.color9999,
                                                      ),
                                                    ),
                                                  ],
                                                ),
                                              ),
                                            ),
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '1.6km',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color9999,
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    height: 100,
                                    child: Column(
                                      children: [
                                        Container(
                                          height: 28,
                                          alignment: Alignment.centerLeft,
                                          child: Text(
                                            '意大利餐厅',
                                            style: StylesUtils.customTextStyle(
                                              color: HexColor.color3333,
                                            ),
                                          ),
                                        ),
                                        Container(
                                          height: 28,
                                          alignment: Alignment.centerLeft,
                                          child: Text.rich(
                                            TextSpan(
                                              children: [
                                                TextSpan(
                                                  text: '4.5分   ',
                                                  style: StylesUtils
                                                      .customTextStyle(
                                                    color: HexColor.colorFfc7,
                                                  ),
                                                ),
                                                TextSpan(
                                                  text: '营业时间：11:30-22:00',
                                                  style: StylesUtils
                                                      .customTextStyle(
                                                    color: HexColor.color9999,
                                                  ),
                                                ),
                                              ],
                                            ),
                                          ),
                                        ),
                                        Container(
                                          height: 28,
                                          alignment: Alignment.centerLeft,
                                          child: Text(
                                            '1.6km',
                                            style: StylesUtils.customTextStyle(
                                              color: HexColor.color9999,
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                ],
                              ),
                              Column(
                                children: [
                                  DrawUnderLine(
                                    child: SizedBox(
                                      height: 71,
                                      child: Column(
                                        children: [
                                          Container(
                                            height: 28,
                                            alignment: Alignment.centerLeft,
                                            child: Text(
                                              '大润发超市',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                color: HexColor.color3333,
                                              ),
                                            ),
                                          ),
                                          Container(
                                            height: 28,
                                            alignment: Alignment.centerLeft,
                                            child: Text(
                                              '1.6km',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                color: HexColor.color9999,
                                              ),
                                            ),
                                          ),
                                        ],
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    child: DrawUnderLine(
                                      child: SizedBox(
                                        height: 71,
                                        child: Column(
                                          children: [
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '大润发超市',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color3333,
                                                ),
                                              ),
                                            ),
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '1.6km',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color9999,
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    child: DrawUnderLine(
                                      child: SizedBox(
                                        height: 71,
                                        child: Column(
                                          children: [
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '大润发超市',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color3333,
                                                ),
                                              ),
                                            ),
                                            Container(
                                              height: 28,
                                              alignment: Alignment.centerLeft,
                                              child: Text(
                                                '1.6km',
                                                style:
                                                    StylesUtils.customTextStyle(
                                                  color: HexColor.color9999,
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                      ),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 10),
                                    height: 71,
                                    child: Column(
                                      children: [
                                        Container(
                                          height: 28,
                                          alignment: Alignment.centerLeft,
                                          child: Text(
                                            '大润发超市',
                                            style: StylesUtils.customTextStyle(
                                              color: HexColor.color3333,
                                            ),
                                          ),
                                        ),
                                        Container(
                                          height: 28,
                                          alignment: Alignment.centerLeft,
                                          child: Text(
                                            '1.6km',
                                            style: StylesUtils.customTextStyle(
                                              color: HexColor.color9999,
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                ],
                              ),
                            ],
                          ),
                        ),
                      ],
                    ),
                  ),
                  Padding(
                    padding: const EdgeInsets.only(top: 20, bottom: 30),
                    child: Column(
                      children: [
                        Center(
                          child: Row(
                            crossAxisAlignment: CrossAxisAlignment.center,
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: [
                              Container(
                                width: 86,
                                height: 1,
                                color: HexColor(HexColor.colorF2f2),
                              ),
                              Container(
                                alignment: Alignment.center,
                                child: Text(
                                  '1000万安心保障',
                                  style: StylesUtils.customTextStyle(
                                    color: HexColor.colorCccc,
                                  ),
                                ),
                              ),
                              Container(
                                width: 86,
                                height: 1,
                                color: HexColor(HexColor.colorF2f2),
                              ),
                            ],
                          ),
                        )
                      ],
                    ),
                  ),
                  Container(
                    alignment: Alignment.center,
                    padding: const EdgeInsets.only(bottom: 40),
                    child: Text(
                      '放心住',
                      style: StylesUtils.customTextStyle(
                        fontSize: StylesUtils.fontSize20,
                        color: HexColor.colorFf62,
                        fontWeight: FontWeight.w700,
                      ),
                    ),
                  ),
                ],
              ),
            ),
          ],
        ),
        onObserve: (resultModel) {
          controller.tabController.index = ObserverUtils.calcAnchorTabIndex(
            observeModel: resultModel,
            tabIndexs: controller.tabIndexs,
            currentTabIndex: controller.tabController.index,
          );
        },
      ),
      bottomNavigationBar: SafeArea(
        bottom: true,
        child: Container(
          height: 70,
          color: Colors.white,
          alignment: Alignment.center,
          child: TextButton(
            onPressed: () {
              Get.toNamed(Routes.hotelOrder);
            },
            style: ButtonStyle(
              fixedSize: const WidgetStatePropertyAll(
                Size(334, 44),
              ),
              minimumSize: const WidgetStatePropertyAll(
                Size(334, 44),
              ),
              backgroundColor: WidgetStatePropertyAll(
                HexColor(HexColor.colorFf62),
              ),
              shape: WidgetStatePropertyAll(
                RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(4),
                ),
              ),
              alignment: Alignment.center,
              padding: const WidgetStatePropertyAll(EdgeInsets.zero),
              foregroundColor: const WidgetStatePropertyAll(Colors.transparent),
            ),
            child: Text(
              '去预定',
              style: StylesUtils.customTextStyle(
                fontSize: StylesUtils.fontSize16,
              ),
            ),
          ),
        ),
      ),
    );
  }
}
